﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Operator2 : MonoBehaviour
{
    public int c;
    // Start is called before the first frame update
    void Start()
    {

        int a = 1;
        int b = 2;
        
        //三目运算符 如果A>b 那么 返回100 否则1000
         c= a > b ? 100 : 1000;
        //条件？ 表达式1：表达式2    满足条件执行表达式1 否则执行2
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
